import { axios2 } from './axios'
// 0、微页面版本记录
export const version = payload => axios2.get('v2/content/micro/statistic/version', {params: payload})
// 0.1 预览
export const preview = ({logicId}) => axios2.get('v2/content/micro/preview/' + logicId, {responseType: 'text'})
// 1、获取访问量、提交量、提交量(微页面数据统计、表单数据统计通用)
export const accessAndsubmit = payload => axios2.post('v2/formPage/accessAndsubmit', payload)
// 2、页面访问数据来源
export const accessSource = payload => axios2.post('v2/formPage/accessSource', payload)
// 3、访问量统计(微页面数据统计、表单数据统计通用)
export const accessStatistics = payload => axios2.post('api/formPage/accessStatistics', payload)
// 4、访问量列表(微页面数据统计、表单数据统计通用)
export const accessList = payload => axios2.post('v2/formPage/accessList', payload, {headers: {'Content-Type': 'application/json'}})
// 5、转发量、转发者带来的访问量、转发者带来的提交量
export const forwardStatistics = payload => axios2.post('v2/formPage/forwardStatistics', payload)
// 6、分享列表展示
export const forwardList = payload => axios2.post('v2/formPage/forwardList', payload)
// 7、获取表单数据
export const submitList = payload => axios2.post('v2/formPage/submitList', payload, {headers: {'Content-Type': 'application/json'}})
// 8、操作渠道
export const optionChannel = payload => axios2.post('v2/customer/formPage/optionChannel', payload, {headers: {'Content-Type': 'application/json'}})
// 9、分页获取渠道
export const queryChannel = payload => axios2.post('v2/customer/formPage/queryChannel', payload, {headers: {'Content-Type': 'application/json'}})
// 10、全量获取渠道
export const getAllChannel = () => axios2.post('v2/customer/formPage/getAllChannel')
// 11、创建可追踪的URL
export const addTraceableUrl = payload => axios2.post('v2/customer/formPage/addTraceableUrl', payload, {headers: {'Content-Type': 'application/json'}})
// 12、删除可追踪的URL
export const delTraceableUrl = 'v2/customer/formPage/delTraceableUrl'
// 13、查询可追踪渠道URL
export const queryTraceableUrl = payload => axios2.post('v2/customer/formPage/queryTraceableUrl', payload, {headers: {'Content-Type': 'application/json'}})
// 14 微页面访问url地址接口
export const urlQrContainer = ({logicId}) => axios2.get('v2/content/micro/statistic/url/get/' + logicId)
// 15、查询订单记录
export const queryOrderList = payload => axios2.post('v2/customer/formPage/queryOrderList', payload, {headers: {'Content-Type': 'application/json'}})
// 15.1、导入客户订单
export const importOrder = 'v2/customer/formPage/importOrder?dev=1'
